import express from 'express';
import UserUpdateController from '../controllers/userUpdate.controller.js';

const router = express.Router();

/**
 * 用户更新相关路由
 */
router.get('/', UserUpdateController.getAllUserUpdates);
router.get('/:id', UserUpdateController.getUserUpdateById);
router.get('/user/:userId', UserUpdateController.getUserUpdatesByUserId);
router.get('/component-version/:componentVersionId', UserUpdateController.getUserUpdatesByComponentVersionId);
router.post('/', UserUpdateController.recordUserUpdate);
router.delete('/:id', UserUpdateController.deleteUserUpdate);
router.delete('/user/:userId/component-version/:componentVersionId', UserUpdateController.deleteUserUpdateByUserIdAndComponentVersionId);

export default router;
